home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / documents / networking / slip.config.general < prev   
Encoding:
Text File  |  1994-08-02  |  39.1 KB  |  974 lines

  1.  
  2.          ~4Dgifts/toolbox/documents/networking/slip.config.general
  3.  
  4.           This document was written by one of SGI's net-gauds for 
  5.             people on SGI machines attempting to implement SLIP.
  6.  
  7.  
  8.  
  9.               SLIP INSTALLATION AND CONFIGURATION GUIDE
  10.  
  11. SLIP (Serial Link Internet Protocol) and PPP (Point to Point Protocol)
  12. are two ways of extending a TCP/IP network over point-to-point links
  13. (like phone lines). They can be configured as dialout only, dialin
  14. only, or bidirectional (the union of dialin and dialout). These
  15. instructions are designed for Irix SLIP in Irix releases 4.x and 5.x,
  16. Irix PPP in Irix release 5.2, and the third-party product MorningStar
  17. PPP on Irix release 4.x (Note that MorningStar PPP is a licensed,
  18. third-party product, and must be purchased from Morning Star
  19. Technologies, Inc, email to sales@morningstar.com for info).
  20.  
  21. There is currently little GUI (visual tool) mechanism for configuring
  22. modems, much less configuring SLIP or PPP. Therefore, configuration
  23. involves working in a shell, and these instructions presume at least
  24. limited familiarity with a straight text editor, such as vi.
  25.  
  26. DOCUMENT SUMMARY:
  27.  
  28. This document contains the following major sections:
  29.  
  30.      SOFTWARE INSTALLATION STATUS: is SLIP or PPP installed?
  31.      MODEM SELECTION: what kind of modems to get.
  32.      MODEM INSTALLATION: how to install and configure the modem
  33.      SELECTING THE IP ADDRESS FOR SLIP OR PPP: how to get from here to there
  34.      ORIGINATE (DIALOUT) CONFIGURATION: configure software for dialout
  35.      ANSWER (DIALIN) CONFIGURATION: configure software for dialin
  36.      SECURITY: keeping the bad guys out
  37.      ADDING DIALIN MODEMS: setting up the modems to answer the phone
  38.      ADDING SLIP OR PPP CLIENTS: Enabling them to dialin
  39.      ADDITIONAL CONSIDERATIONS: miscellaneous info
  40.      DEBUGGING: when things go wrong
  41.      APPENDIX currently only contains one entry:
  42.      SAMPLE GATED.CONF FILES: to route between LANs connected by SLIP or PPP
  43.  
  44.  
  45. SOFTWARE INSTALLATION STATUS:
  46.  
  47. Make sure that you have the software properly installed before you
  48. attempt to configure anything. You need to have the standard but non-
  49. default Irix subsystems eoe2.sw.uucp and eoe1.sw.slip (for pre-5.2
  50. Irix) or eoe1.sw.ppp and eoe2.sw.slip (for Irix-5.2) installed. You
  51. can check whether they are installed with the "versions" command and
  52. should show something like the following:
  53.  
  54.     % versions -a eoe\?.sw.{uucp,slip,ppp}
  55.     I = Installed, R = Removed
  56.  
  57.        Name                 Date      Description
  58.  
  59.     I  eoe1                 01/24/94  IRIX Execution Environment 1, 5.2
  60.     I  eoe1.sw              01/24/94  IRIX Execution Environment Software
  61.     I  eoe1.sw.ppp          01/24/94  Point-to-Point Protocol Software
  62.  
  63.     I  eoe2                 01/24/94  IRIX Execution Environment 2, 5.2
  64.     I  eoe2.sw              01/24/94  IRIX Execution Environment Software
  65.     I  eoe2.sw.slip         01/24/94  SLIP Software
  66.     I  eoe2.sw.uucp         01/24/94  UUCP Utilities
  67.  
  68.  
  69. Because MorningStar (aka MST) PPP is a third-party product with a
  70. kernel driver, software upgrades will, in effect, "de-install" it.
  71. After doing an Irix software upgrade, you will probably have to
  72. reinstal the MST PPP kernel driver, and rebuild a new kernel.
  73.  
  74. Configuring Irix SLIP, Irix PPP and MST PPP are very similar, the main
  75. difference is the directory where the software resides is different,
  76. and each has a different way of specifying options.
  77.  
  78. MODEM SELECTION:
  79.  
  80. A number of different modems have Dialer entries and configuration
  81. scripts for use with Irix SLIP and PPP and MST PPP.  Generally, you
  82. just need a high quality V.32 or faster modem. Under most
  83. circumstances you should avoid using proprietary modem protocols such
  84. as PEP or HST, and stick with the standard ones ("V" protocols).
  85.  
  86.     A short diversion on the "V." number protocols: These are CCITT
  87.     standards for modems, and allow modems from different
  88.     manufacturers to interoperate (talk to each other). Some of the
  89.     standards refer to modem carrier (or modulation) speeds, and
  90.     others refer to additional protocols. The ones of interest
  91.     include:
  92.  
  93.        V.32    -- 9600bps full-duplex modulation
  94.        V.32bis -- 14400bps full-duplex modulation, fully compatible
  95.                   with V.32
  96.        V.42    -- end-to-end error correction, runs "on top of" V.32, etc
  97.        V.42bis -- data compression, theoretically capable of 4:1, more
  98.                   commonly gets 1.5:1 to 2.5:1 on non-compressed data.
  99.                   In practice, usually limited by DTE speeds.
  100.  
  101.     The following are "in-process" standards, which may be of
  102.     interest, as some modems already support a variant of them:
  103.  
  104.         V.32ter -- 19200bps extension of V.32bis, being driven by
  105.                    industry co-operation, while waiting for V.34
  106.         V.FAST  -- 28800bps, still in R&D and specification refinement
  107.         V.34    -- the final name of the V.FAST standard
  108.  
  109. Because of the existence of V.42bis data compression, it is no longer
  110. usefull to have the DTE (aka "serial port") run at the same speed as
  111. the modulation. In general, the DTE should be set to the highest speed
  112. common to both the modem and the computer, and hardware flow control
  113. (aka RTS/CTS flow control) is used to prevent data overruns (or data
  114. losses). Modern modems and computers will handle 38400bps or faster
  115. DCE speeds.
  116.  
  117. The following modems have Dialers entries and configuration scripts that 
  118. make them easier to use for Irix SLIP and PPP:
  119.  
  120.     Telebit T2500, T1600, QBlazer, T3000, and WorldBlazer
  121.     ZyXEL U-1496 (all versions)
  122.     Intel 14.4ex
  123.     DSI 9624 models
  124.     USRobotics
  125.     Hayes ACCURA
  126.     almost any true Hayes compatible can be made to work.
  127.  
  128. MorningStar supports a large number of modems (see their documentation
  129. for the current list).
  130.  
  131. MODEM INSTALLATION:
  132.  
  133. The modem needs to be attached to one of the serial ports with a real
  134. modem cable. At the moment you cannot buy a third-party, mass-market
  135. modem cable for an IRIS workstation or server. Some of the newest Mac
  136. modem cables *may* work for the Indigo line, but most Mac modem cables
  137. handle *either* Modem Control lines *or* Hardware Flow Control lines,
  138. but *not* both. You need a cable that handles both (all seven lines)
  139. to run a SLIP or PPP connection on an IRIS. A number of SGI cable part
  140. numbers are available. It is currently unclear whether all were
  141. actually manufactured (or read `man serial` and build your own):
  142.  
  143.                                                  Indigo2 Owner's Guide
  144.   018-8114-001   Indigo to dumb terminal                  p. 5-21
  145.   X5-25TO8       Indigo to modem cable                    p. 5-22
  146.   X5-9TO8        Indigo to SGI/high-end (dials/buttons)   p. 5-23
  147.   X5-ARCTO8      Indigo to PC (ARCS!)                     p. 5-24
  148.  
  149. Note that "Indigo" referes to Indigo, Indigo2, and Indy unless
  150. otherwise stated.
  151.  
  152. Selecting a port to use: on graphics machines, any port can be used.
  153. The low-end machines (PI, Indy and Indigo family) only have 2 serial
  154. ports, and either can be used, although port tty1 will need to be
  155. specially configured. The larger machines generally have more than 2,
  156. and more can be added using the CDSIO 6-port serial board. A server
  157. (non-graphics) machine cannot use port tty1, because that is the
  158. console port.
  159.  
  160. Serial port tty1 is the Alt(ernate) Console port, and must be disabled
  161. if you wish to use a modem on it. You will need to edit /etc/inittab
  162. and change the "Alt Console" line from "respawn" to "off".
  163.  
  164. Irix supplies scripts for automatically configuring a modem for use
  165. with SLIP or PPP. The scripts are in /usr/lib/uucp, and the names all
  166. start with "fix-". On a 5.2 system, the following fix- scripts are
  167. available (these are also available for 4.0 systems by anonymous ftp
  168. from ftp.sgi.com:/sgi/modems):
  169.  
  170.     fix-dsi fix-hayes fix-intel fix-telebit fix-usr fix-zyxel
  171.  
  172. Assuming you wanted to program a dialout Telebit T3000 to run at
  173. 38400bps on port 2 you would give the following command:
  174.  
  175.     /usr/lib/uucp/fix-telebit -o -m t3000 -s 38400 2
  176.  
  177. This would normally only need to be performed once. Using the "-io"
  178. option instead of "-o" will setup a modem usable for dialin, dialout,
  179. or both.
  180.  
  181. SELECTING THE IP ADDRESS FOR SLIP OR PPP
  182.  
  183. IP address selection and routing are intimately connected. You cannot
  184. discuss one without at least mentioning the other. Routing is how the
  185. packets know where to go in the network. Using a wrong IP address can
  186. screw up routing for more than just the machine with the wrong IP
  187. address, in worst case it can cause the whole network to fail!
  188. Fortunately, we've never seen anything approaching worst case yet.
  189.  
  190. IP addresses are not selected at random, they are assigned by certain
  191. administrator(s) within your organization, with ultimate authority
  192. from the NIC (Network Information Center) that arbitrates the whole
  193. Internet.
  194.  
  195. Terminology: I will refer to the host running SLIP that is connected
  196. to the larger network (sometimes the Internet) as the "server" host,
  197. and the host running PPP connected to the smaller network as the
  198. "client" host. In particular, if there is only the one machine on the
  199. client network, it is known as "isolated" or "stand alone". Unless
  200. otherwise stated, "SLIP" and "PPP" are interchangeable in this
  201. section.
  202.  
  203. The IP address for a SLIP-client is determined by the IP network that
  204. the SLIP-server is connected to. There are 3 general cases to consider,
  205. and one special case (also referred to as a "borderline" case).
  206.  
  207. The first two cases deal with stand-alone or isolated machines. There
  208. is a fuzzy deviding line between "a few" and "a lot" of standalone
  209. hosts desiring to be SLIP-connected to one network. 1-5 hosts is
  210. definitely "a few", 50 is definitely "a lot". The difference is that
  211. "a few" put the clients on the same IP network as the server(s), and
  212. "a lot" puts all the clients on their own "slip-net", using another IP
  213. network number. IP network numbers are in limited supply, so it make
  214. sense to not "waste" them.
  215.  
  216. The first case deals with "a few" isolated IRISes to become SLIP
  217. clients. Each client is expected to not grow into a multiple-host
  218. network site, for which this technique is not appropriate (although
  219. there is a special case that mostly works).
  220.  
  221.    In this case, the easiest solution is to take an IP address on the
  222.    network of the server. The client will setup a default route
  223.    through the SLIP interface, and the server will do "proxy arp" for
  224.    the client. This makes the least demands on routing: on the client,
  225.    the rest of the world is accessed via the SLIP interface; and the
  226.    server acts in proxy for the client for packets going the other
  227.    way. The client will have it's Ethernet interface disabled, the
  228.    simplest method is via `chkconfig network off`.
  229.  
  230.    For example, the case of an Indigo connecting via SLIP to a WAN
  231.    site. Follow a packet when doing `ping foo.bar.com`: IP first looks
  232.    up foo.bar.com in /etc/hosts, and finds it (192.2.3.4). The IP
  233.    address is not the same as the local host, so IP looks in the
  234.    routing table for the interface to use for the 192.2.3.0
  235.    network. The only one that matches is "default" points to the SLIP
  236.    interface. The packet gets shipped across to the server, where IP
  237.    routing on the server takes over like normal. The packet eventually
  238.    makes it's way to foo.bar.com, where the echo-server (ping server)
  239.    sends a return packet. Routing gets the packet back to the
  240.    SLIP-server's network. It uses ARP (Address Resolution Protocol) to
  241.    determine the Ethernet address for SLIP-client's IP address, and
  242.    SLIP-server responds "me! me!"  SLIP-server knows to send the
  243.    packet over the PPP link, back to client. (I'm not going into this
  244.    detail again!).
  245.  
  246.    In short, after slip or pppd starts, on the client you would
  247.    execute the command:
  248.  
  249.       route add net default <server> 1
  250.  
  251.    (in Irix-5.1 and later this can be done automatically by the slip
  252.    or ppp process, see the man pages) and on the server, the command:
  253.  
  254.       arp -s <client> `netstat -ia | grep :` pub
  255.  
  256. The second case for "a lot" of standalone hosts is to assign an IP
  257. network number for the use of SLIP or PPP clients (a "slip-net"). It
  258. is simpler in some respects than the previous case.
  259.  
  260.    Each client will get an IP address out of the slip-net. The client
  261.    needs to setup a default route like above. The server can use the
  262.    standard Irix routed configuration (although adding the "-q" or "-F
  263.    slip-net" option to routed will increase available bandwidth). The
  264.    client does not need to disable the ethernet port unless it needs
  265.    to communicate with other hosts on the slip-net, in which case both
  266.    need to `chkconfig network off` (or the equivalent). You could, in
  267.    fact, set up a small remote LAN using the slip-net, but you would
  268.    forever give up the ability to communicate with other, non-local,
  269.    hosts on the slip-net (well, it would be *really* tricky to
  270.    configure). Routing to let the other machines communicate would be
  271.    very tricky.
  272.  
  273.    You can use the slip-net with servers on multiple nets as long as
  274.    one important criteria is met: the routers on *ALL* possible routes
  275.    between the networks must pass host routes correctly. Currently,
  276.    IRIS routers do this, and Cisco's do not (in the current software
  277.    releases, though they can be configured to not screw things up,
  278.    they don't forward host routes, but do stop munging them). I don't
  279.    know about other router brands.
  280.  
  281.    This is the most "hands-off" mechanism, but is usually not
  282.    justifiable for small numbers of SLIP hosts.
  283.  
  284.    An alternative to `chkconfig network off` is to leave the host's IP
  285.    address to the default (192.0.0.1), and have slip or ppp use the
  286.    assigned IP address as the non-default local address ('-l <local>'
  287.    option to Irix SLIP, see the man pages for the others).
  288.  
  289. The other major case is connecting a small remote LAN to a larger one
  290. (usually an institutional LAN or WAN).
  291.  
  292.    In this case, the remote LAN would be given it's own IP network
  293.    number, and the SLIP- or PPP-client would get one of them. Routing
  294.    issues are much more important. Both hosts running PPP will also
  295.    have to run gated so as to advertise the appropriate network routes
  296.    to the other hosts on their respective LANs.
  297.  
  298.    The SLIP-client will have a static default route to the SLIP
  299.    interface as in the previous case, but gated will advertise the
  300.    default route to the other machines on the LAN. The SLIP-server
  301.    will run gated to advertise the network route via the SLIP link to
  302.    the remote LAN. In addition, Cisco (and other brand) router(s)
  303.    communicating via IGRP in a WAN-type configuration may need to have
  304.    it's configuration modified to know about the additional IP network
  305.    that it needs to route for. Since gated is difficult to configure,
  306.    other approaches include setting up a static route on each of the
  307.    client-side hosts, or have another machine (eg: the Cisco router)
  308.    advertise the route.
  309.  
  310.    Sample /usr/etc/gated.conf files will be listed at the end of the
  311.    file. Note that I am by no means a gated expert (or even novice,
  312.    yet), but these configurations have been known to work in some
  313.    cases. I don't know how to specify the netmask yet, since it may be
  314.    important for some sites.
  315.  
  316. The special case is a very small LAN consisting of 2 (or at most 3)
  317. hosts connecting via SLIP or PPP to the campus LAN directly. It may
  318. have grown out of the isolated host case, or an site that is
  319. expected to never grow any more.
  320.  
  321.    All the hosts are assigned IP addresses from the IP network of the
  322.    PPP-server. The server will proxy-arp for all of the remote hosts,
  323.    and the PPP-client will need to arp for all of the hosts on the
  324.    other side that they care about getting to. At a minimum, this will
  325.    be the router, the mail relay machine, and any server machines.
  326.    In addition, the client will have a static default route pointing
  327.    to the PPP interface, and each of the other machines needs a static
  328.    default route pointing to the PPP-client.
  329.  
  330.    Because of the need to maintain the ARP tables up-to-date, moving
  331.    machines around can cause mysterious failures of the network.
  332.  
  333. NOTE: because of arp caches, changes to the arp tables (via the arp
  334. command) may not take affect immediately. This can cause routing
  335. problems until either the cache expires after the arp mapping is
  336. explicitly deleted (via `arp -d` on IRISes, or removing the host). The
  337. default arp cache timeout is 20 minutes on IRISes, 4(?) hours on Cisco
  338. routers. For others, you'll need to check the documentation or ask the
  339. vendor.
  340.  
  341.  
  342. ORIGINATE (DIALOUT) CONFIGURATION:
  343.  
  344. This involves modifying several configuration files. The information
  345. needed to perform the configuration includes:
  346.  
  347.    local hostname & IP address
  348.    remote hostname & IP address
  349.    modem type
  350.    phone number
  351.    login
  352.    password
  353.    framing (SLIP or PPP)
  354.    IP address of a nameserver so that DNS can lookup host names
  355.  
  356. The edits are organized by configuration file:
  357.  
  358. /etc/hosts: really only needs 3 entries, as all others can be obtained
  359.    from the nameserver after a connection is made. The hosts file
  360.    could look like (with appropriate substitutions):
  361.  
  362.         127.0.0.1   localhost loghost
  363.         xx.yy.zz.ww <myname>.<domain>.sgi.com <myname>
  364.         aa.bb.cc.dd <remote>.<domain>.sgi.com <remote>
  365.         224.0.0.0   multicast
  366.  
  367. ~uucp/Devices: (~uucp is /usr/lib/uucp in Irix4, /etc/uucp in Irix5).
  368.    This is common for all versions, to allow the use of cu for
  369.    debugging connection problems. Make all additions and changes at
  370.    the bottom of the file to simplify future updates. Assume using
  371.    port tty2 for the example:
  372.  
  373.         Direct ttyd2 - Any direct
  374.         Direct ttym2 - Any direct
  375.         Direct ttyf2 - Any direct
  376.  
  377. For SLIP and Irix PPP connections, edits are to files in ~uucp:
  378.  
  379. ~uucp/Devices: Based upon the modem type (assume Telebit T3000 at
  380.    38400bps and port tty2 for the example), add the following to the
  381.    bottom of the file for each dialout modem. If all modems are
  382.    "equivalent" (any modem to any destination), then use the same
  383.    label for each modem (ACUslip), otherwise you'll need to make
  384.    different labels for each class of modem. Make sure that the last
  385.    field (t3000 in the example) is in your dialers file, or it will
  386.    fail "mysteriously"!
  387.  
  388.         ACUslip ttyf2 null 38400 212 x t3000
  389.  
  390. ~uucp/Systems: This is the "smarts" for dialing the modem and logging
  391.    in to the server (to start SLIP). This is a "standard" chat script,
  392.    modifications may be made in some circumstances. Put the entries at
  393.    the end of the Systems file. There may be more than one line with
  394.    the same <remote> name, to use either a different modem or a
  395.    different phone number (or both) (note this should all be on one
  396.    line)
  397.  
  398.         <remote> Any ACUslip 38400 <phone_number> "" \r\c ogin:--ogin:
  399.         <login_name> assword: <password> <framing>
  400.  
  401.    Since both Irix SLIP and Irix PPP send out a message with the
  402.    framing name before actually starting the protocol, adding a final
  403.    match of "SLIP" or "PPP" will ensure that the login really
  404.    succeeded. I make the convention or prefixing <remote> with "S" for
  405.    SLIP or "P" for PPP, followed by the hostname.
  406.  
  407. There are several ways to start a SLIP connection. You don't have much
  408. choice under Irix4 -- /usr/etc/slip dials the phone as soon as it is
  409. started, and will not automatically setup a route. Irix5 has a daemon
  410. mode, and can automatically startup a route. You will need to do
  411. something like the following (either manually, or in a script). It is
  412. recommended to use the cslip mode (aka Van Jacobson Header
  413. Compression) whenever possible, as it makes the link feel more
  414. responsive by decreasing latency. See `man slip` for more detail.
  415.  
  416. Irix4 version (can do it in Irix5 also):
  417.  
  418.         /usr/etc/slip -o -c -p cslip -r <remote> &
  419.         [wait for the connection message]
  420.         /usr/etc/route add net default <remote> 1  # only on a client!!!!
  421.  
  422. Irix5 version can be configured to start on boot, and will do dynamic
  423. link management. Something like the following script can be put in
  424. /etc/init.d/network.local (or whatever), and a link added in
  425. /etc/rc2.d to start it up at boot time. NOTE: don't use the '-R ""'
  426. option on a server! See `man slip` for more info. Note: <chat_name> is
  427. the first field of the Systems entry if it is different than the
  428. hostname of the remote.
  429.  
  430.         #!/bin/sh
  431.         # slip boot startup script
  432.         case $1 in
  433.            start)
  434.                /etc/killall slip
  435.                /usr/etc/slip -q -p cslip -R "" -r <remote> -u <chat_name> &
  436.                ;;
  437.            stop)
  438.                /etc/killall slip
  439.                ;;
  440.         esac
  441.  
  442. Irix5 PPP is very similar, but options are handled differently -- all
  443. of the options are put in the file /etc/ppp.conf. See `man ppp` for
  444. details and instructions; mostly the defaults are fine. Probably the
  445. most important options are "in" for a dialin-only server, and "quiet"
  446. for the autodial client and bi-directional dial server. A startup file
  447. would look similar to the SLIP example. This example will also show
  448. adding a chkconfig option check. Note that "rmt" is only a label in
  449. /etc/ppp.conf, similar to "-u" option to Irix SLIP.
  450.  
  451.         #!/bin/sh
  452.         # ppp boot startup script
  453.         case $1 in
  454.            start)
  455.                /etc/killall ppp
  456.                if /etc/chkconfig ppp && test -x /usr/etc/ppp ; then
  457.                    /usr/etc/ppp -r rmt &
  458.                fi
  459.                ;;
  460.            stop)
  461.                /etc/killall ppp
  462.                ;;
  463.            *)
  464.                echo "usage: $0 {start|stop}"
  465.                ;;
  466.         esac
  467.  
  468. The entry in /etc/ppp.conf for this situation might look like:
  469.  
  470.         rmt quiet remotehost=server lochost=client add_route uucp_name=Pserver
  471.  
  472. Where "lochost=client" specifies the IP address of the local end of
  473. the PPP link, if different from the hostname, and Pserver is the entry
  474. in the /etc/uucp/Systems file. (Note that there is a typo in the 5.2
  475. ppp man page, and "add_route" is the correct spelling).
  476.  
  477. MorningStar PPP for Irix4 is configured similarly to Irix5 SLIP, but
  478. the files are in a different directory: /usr/etc/ppp, and the syntax
  479. is slightly different. First `cd /usr/etc/ppp`:
  480.  
  481. cp Devices.ex Devices
  482.  
  483.    Then add a line at the end for each modem like:
  484.  
  485.         T3000 ttyf2   38400
  486.  
  487. cp Systems.ex Systems
  488.  
  489.    Then add at the end of the file lines like (again, it should all be
  490.    on one line):
  491.  
  492.         <remote> Any ACU 38400 <phonenumber> "" \r\c ogin:--ogin:
  493.         <login> assword: <password>
  494.  
  495. cp Startup.ex Startup
  496.  
  497.    And edit near the end to add the lines (again, don't add the route
  498.    command if you are a server!) [`man pppd` for more options]:
  499.  
  500.         pppd `hostname`:<remote> auto idle 300 passive vjcomp filter \
  501.         /usr/etc/ppp/Filter log /usr/adm/pppd.log
  502.         route add net default <remote> 1
  503.               echo ' <remote>\c'
  504.  
  505. Then give the command:
  506.  
  507.      chkconfig pppd on
  508.  
  509. To enable pppd to automatically startup on boot.
  510.  
  511. For any of the dynamically dialed setups (Irix5 `slip -q`, Irix5 ppp
  512. with "quiet" option and MST PPP with "auto" option), you can start a
  513. link via a ping or rlogin or almost anything that wants to go over the
  514. link. They will timeout and hangup the phone after a programmable idle
  515. time, then re-dial when the traffic resumes. This can save a lot of
  516. money if you are connecting long distance! The idle times are
  517. configurable (see the respective man pages). Note that it takes about
  518. 30 seconds for the first packet to get through when starting an idle
  519. line, so active timeouts much less than a couple of minutes are not
  520. very useful.
  521.  
  522. ANSWER (DIALIN) CONFIGURATION:
  523.  
  524. A SLIP or PPP server is easier to configure than a SLIP or PPP client,
  525. but security is far more important, since it is required to have
  526. dialable modems.  There are three parts to configuring a server:
  527. setting up the modem (or modems), setting up the security on the
  528. machine, and adding the capability for SLIP or PPP client(s) to dial in.
  529.  
  530. SECURITY:
  531.  
  532. There must be no un-passworded accounts on the machine. Many of the
  533. standard accounts are not intended to be logged in to (especially on a
  534. server), so they can be disabled by placing a "*" in the second field
  535. of /etc/passwd.  Accounts in this category include: sysadm, diag,
  536. daemon, bin, uucp, sys, adm, lp, man, nobody, nuucp, tutor, demos and
  537. 4Dgifts (also rfindd on Irix5). Active accounts that need good
  538. passwords include: root, guest, and all user accounts. A "good"
  539. password is one that is difficult to guess, especially by an external
  540. "cracker". The guest account can still be open to the network by
  541. creating a ".rhosts" file, as follows:
  542.  
  543.     % su
  544.     # echo "+ +" >~guest/.rhosts
  545.     # chown root.sys ~guest/.rhosts
  546.     # chmod 640 ~guest/.rhosts
  547.     # chmod +t ~guest
  548.     # exit
  549.     %
  550.  
  551. Note that NIS accounts (aka YP, ones that start with a "+") are at
  552. least as important to check as the local ones, and may be harder to
  553. deal with.
  554.  
  555. If there is a /.rhosts file, it is mandatory that it be minimal and
  556. secure. Minimize the number of entries!
  557.  
  558.     % su
  559.     # chown root.sys /.rhosts
  560.     # chmod 400 /.rhosts
  561.     # exit
  562.     %
  563.  
  564. Passwords may be added to accounts either via the System Manager, or
  565. from a shell as follows:
  566.  
  567.     % su
  568.     # passwd nuucp
  569.     Changing password for nuucp on <host>.
  570.     New password:                        
  571.     Re-enter new password:
  572.     # exit
  573.     %
  574.  
  575. To help prevent unauthorized access to the network by outsiders, the
  576. dialup password facility should be enabled. This is done by creating
  577. the two files /etc/dialups and /etc/d_passwd. The following example
  578. will allow SLIP connections but not UUCP or interactive dialups via
  579. modems attached to ports 1 and 2:
  580.  
  581.    /etc/dialups:
  582.  
  583. /dev/ttyd1
  584. /dev/ttym1
  585. /dev/ttyf1
  586. /dev/ttyd2
  587. /dev/ttym2
  588. /dev/ttyf2
  589.  
  590.    and /etc/d_passwd:
  591.  
  592. /bin/csh:*:
  593. /bin/tcsh:*:
  594. /bin/sh:*:
  595. /bin/ksh:*:
  596. /usr/lib/uucp/uucico:*:
  597. /usr/etc/remoteslip::
  598. /usr/etc/ppp::
  599. /usr/etc/dbslip::
  600. /usr/etc/ppp/Login::
  601.  
  602.  
  603. ADDING DIALIN MODEMS:
  604.  
  605. Each server may have one or more dialin modems (2 maximum on
  606. Indigo, Indy and PI, more on ASD machines or if using CDSIO
  607. boards). The file "/etc/inittab" will need to be modified as follows
  608. to add modems:
  609.  
  610. The original lines about 20-30 lines from the top (note that this
  611. changes in detail from release to release):
  612.  
  613. #
  614. # Use the ttym* or ttyf* device names and the du_* or dx_* gettydefs tags
  615. #       for ports with modems.  See the getty(1M), uugetty(1M), init(1M),
  616. #       gettydefs(4), and inittab(4) man pages.
  617. #
  618. # on-board ports
  619. tp:23:respawn:/etc/getty tport co_9600  # textport
  620. t1:23:respawn:/etc/getty ttyd1 co_9600  # alt console
  621. t2:23:off:/etc/getty -N ttyd2 co_9600   # port 2
  622. t3:23:off:/etc/getty -N ttyd3 co_9600   # port 3
  623. t4:23:off:/etc/getty -N ttyd4 co_9600   # port 4
  624. #
  625.  
  626. change to look like (assuming 2 modems, a T2500 and a T3000):
  627.  
  628. #
  629. # Use the ttym* or ttyf* device names and the du_* or dx_* gettydefs tags
  630. #       for ports with modems.  See the getty(1M), uugetty(1M), init(1M),
  631. #       gettydefs(4), and inittab(4) man pages.
  632. #
  633. # on-board ports
  634. tp:23:respawn:/etc/getty tport co_9600  # textport
  635. t1:23:respawn:/usr/lib/uucp/uugetty -Nrt20 -it25in,conn ttyf1 dx_19200  # 
  636. t2:23:respawn:/usr/lib/uucp/uugetty -Nrt20 -it16in,conn ttyf2 dx_38400  # 
  637. t3:23:off:/etc/getty -N ttyd3 co_9600   # port 3
  638. t4:23:off:/etc/getty -N ttyd4 co_9600   # port 4
  639. #
  640.  
  641. use "-it25in,conn" for T2500 modems, and "-it16in,conn" for T1600,
  642. T3000 and QBlazer. If only one modem is in use, the unused port(s)
  643. should be "off" instead of "respawn".
  644.  
  645. NOTE: If the server is a graphics-less machine, don't change the "t1"
  646. line, as it is used by the console terminal, and can't be used for a
  647. modem.
  648.  
  649. After making the changes, type the following command for each modem
  650. installed (use the approriate modem type, t2500, t1600 (for t3000
  651. also on Irix4), instead of qblazer if needed):
  652.  
  653.     % su
  654.     # /usr/lib/uucp/fix-telebit -i -m qblazer 1
  655.     # /usr/lib/uucp/fix-telebit -i -m qblazer 2
  656.  
  657. Many systems can benefit from using 38400 serial speed. Not all modems
  658. or SGI machines can communicate at 38400, and the software support is
  659. not complete until 5.0. 38400 capability can be added by adding the
  660. following line to /etc/gettydefs if it doesn't exist:
  661.  
  662. dx_38400# B38400 # B38400 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_38400
  663.  
  664. If installing Morningstar PPP, just use the same /usr/lib/uucp/fix-*
  665. scripts as when configuring the modem for SLIP:
  666.  
  667.    % su
  668.    # /usr/lib/uucp/fix-telebit -io -m t3000 -s 38400 2
  669.  
  670. And a /etc/inittab entry for 38400 might look like:
  671.  
  672. T2:23:respawn:/usr/lib/uucp/uugetty -Nt15 -it16in,conn ttyf2 dx_38400    # modem port
  673.  
  674. After all of the modems have been configured, give the command:
  675.  
  676.    % su
  677.    # /etc/telinit q
  678.  
  679. to have the changes take effect.
  680.  
  681.  
  682.  
  683. ADDING SLIP OR PPP CLIENTS, and enabling them to dialin:
  684.  
  685. The following information is needed to configure a SLIP or PPP dialin,
  686. and needs to match exactly what was used to configure the client:
  687.  
  688.    the client's hostname and domainname (this should be in NIS/YP,
  689.                 DNS, and (maybe) /etc/hosts). The IP address must match.
  690.    the loginname and password that will be used by the SLIP login
  691.  
  692. Two files need to be edited for each client: "/etc/passwd",
  693. "/usr/etc/remoteslip" for Irix SLIP, "/etc/ppp.conf" for Irix PPP and
  694. /usr/etc/ppp/Login for MST PPP. For the sake of example, we will use a
  695. client hostname of "client.domain.sgi.com" with a username of
  696. "Sclient" and a password of "password". The line to add in
  697. /etc/password will for Irix SLIP look like (make sure that the login
  698. home directory exists!):
  699.  
  700. Sclient::0:0:SLIP login client.domain.sgi.com,,:/usr/spool/uucppublic:/usr/etc/remoteslip
  701.  
  702. for Irix PPP will look like:
  703.  
  704. Pclient::0:0:Irix PPP login client.domain.sgi.com,,:/usr/spool/uucppublic:/usr/etc/ppp
  705.  
  706. and for MST PPP look like:
  707.  
  708. Pclient::0:0:MST PPP login client.domain.sgi.com,,:/usr/etc/ppp:/usr/etc/ppp/Login
  709.  
  710. the password can be set by (for SLIP, PPP is similar):
  711.  
  712.    % su
  713.    # passwd Sclient
  714.    Changing password for Sclient on server.
  715.    New password:password
  716.    Re-enter new password:password
  717.    #
  718.  
  719. The password is not echoed.
  720.  
  721. for Irix4 SLIP clients, add a section like the following to
  722. "/usr/etc/remoteslip" (routing on clients is a bit of a problem,
  723. though):
  724.  
  725. Sclient)
  726.    exec /usr/etc/slip -i -p cslip -r <client>.<domain>.sgi.com
  727.    ;;
  728. #
  729.  
  730. For Irix5 SLIP clients, routing on clients is easier because of the -R
  731. option:
  732.  
  733. Sclient)
  734.    exec /usr/etc/slip -i -p cslip -R "" -r <client>.<domain>.sgi.com
  735.    ;;
  736. #
  737.  
  738. The following section must remain the last one in the file:
  739.  
  740. *)
  741.         exec /usr/etc/slip -i -r $USER
  742.         ;;
  743. esac
  744.  
  745.  
  746. Because PPP is able to dynamically configure things during the login
  747. sequence, you generally do not need to edit /usr/etc/ppp/Login (for
  748. MST PPP). You may need to edit /etc/ppp.conf for Irix PPP. If you do
  749. need something special for one or more clients, it can be edited
  750. similarly. See the man page for details, but a minimal dialin-only
  751. server /etc/ppp.conf that negotiates the client's IP address might
  752. look like:
  753.  
  754.      rmt in remotehost=0.0.0.0
  755.  
  756. Where "rmt" is the login for the dialin-only clients.
  757.  
  758. ADDITIONAL CONSIDERATIONS:
  759.  
  760. If the connect time of each individual client is expected to be low,
  761. then there does not need to be as many server modems as there are
  762. clients to dial into the site. All of the clients should be able to
  763. connect to all of the servers, and the phone lines should be set up in
  764. a "hunt group" (aka "rotary"). Then any client calling in will get the
  765. first available  server modem.
  766.  
  767. And for the obscure bug of the month award:
  768.  
  769. If you are changing a connection from SLIP to PPP or vice-versa, you
  770. will need to reboot both machines before packets will pass. The reason
  771. is deep in the kernel routing mechanism.  If you are really good a
  772. mucking around in /dev/kmem, you might be able to avoid a reboot, but
  773. I advise against it. If there are two interfaces to the same remote
  774. address, the kernel will always use just one of them, which may not be
  775. the one you want or expect. If you see something like the following
  776. output from `netstat -i`, then you must reboot before things will
  777. work:
  778.  
  779. % /usr/etc/netstat -i
  780. Name Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll
  781. ec0  1500  192.82.181  starstruck.losa 16704753  2490 14890682    98 14870035
  782. lo0  32880 loopback    localhost        2142995     0  2142995     0     0
  783. du0* 1500  (pt-to-pt)  corvette.losang     2364     0   106924     0     0
  784. sl0* 512   (pt-to-pt)  corvette.losang        5     1        0     0     0
  785. sl1* 1006  none        none                   0     0        0     0     0
  786. sl2* 1006  none        none                   0     0        0     0     0
  787. sl3* 1006  none        none                   0     0        0     0     0
  788.  
  789. du0 and sl0 having the same address is the culprit here.
  790.  
  791. DEBUGGING
  792.  
  793. Things don't always work the way you expect or want them to. Things
  794. either don't work, or stop working. Here are some things to check.
  795.  
  796. Since most modems are setup to let you heare them dial, this is a good
  797. first starting point. If you can here the modem dialing, then go to
  798. the "turn on debugging" section, otherwise you need to check for more
  799. fundamental configuration issues.
  800.  
  801. First, do a fundamental sanity check of the hardware: make sure that
  802. the modem is plugged in, turned on, and the modem cable is securely
  803. connected to both the computer and modem. Double check that it is
  804. plugged into the same serial port that you configured it -- don't
  805. setup the configuration to use /dev/ttyf2 and then plug the modem
  806. cable into port 1 on the back of the computer!
  807.  
  808. Second, most modems have two phone jacks on the back, one goes to the
  809. wall jack (usually labelled "line" or "wall") and the other is for
  810. plugging a telephone into the same phone line (usually labelled
  811. "phone"). Make sure that you are plugged into the correct jack. This
  812. is an easy error if you deal with more than one modem, because each
  813. modem brand has a different jack on the left.
  814.  
  815. Plug a phone into the second jack on the modem if it has one (or in
  816. place of modem otherwise), and try dialing the phone number the modem
  817. is supposed to dial. Be careful, because if the number is correct,
  818. you'll get a modem squeal in your ear. If you don't, then either the
  819. number is incorrect, there is a problem with the phone line, or the
  820. modem isn't setup correctly on the other end.
  821.  
  822. Although not strictly hardware, it is worth checking that you are
  823. using the same speed (19200 or 38400) everywhere (Devices and Systems
  824. files), and that you gave the same speed option to the fix-*
  825. configuration script. The modems are configured to use a fixed speed,
  826. and most won't even talk at a different one. Any experience you may
  827. have had with "autobaud" modems is misleading.
  828.  
  829. Next: turn on debugging, to see what is *really* going on, not what
  830. you thought you set up.
  831.  
  832.    For Irix SLIP and PPP: add '-d' option to the command. THe more
  833.    "d"s, the more debugging. One "d" is usually enough for the first
  834.    pass of testing. To check out the answering PPP, you will have to
  835.    add "debug=1" (larger number for more debugging) to the line in
  836.    /etc/ppp.conf, the debugging output goes to /usr/adm/SYSLOG.
  837.  
  838.    For MorningStar PPP, add "log - debug 2" (the "-" is to send
  839.    debugging info to the terminal, use larger numbers for more
  840.    debugging).
  841.  
  842. You are really interested in only a few key points in the debugging
  843. output.  The debugging format is different for each program, so I will
  844. point out what to look for. The first thing is to make sure that it is
  845. really talking to the modem. Among the debugging lines that go by will
  846. be a line that tells you which port it is trying to use, which speed
  847. it is using, and what dialer script it is trying to use. These should
  848. match what you configured.
  849.  
  850. The usual problem at this point is a chat script error. Here is a
  851. sample successful login using Irix PPP to a Telebit NetBlazer (my
  852. comments are enclosed in braces "{}"):
  853.  
  854.     # ppp -dd -r slipserv
  855.     ppp slipserv: LCP initialized
  856.     ppp slipserv: IPCP initialized
  857.     conn(Pslipserv)                     {the Systems file name}
  858.     Device Type ACUSLIP wanted
  859.     Internal caller type 212
  860.     Use Port /dev/ttyf1, acu - /dev/null, Phone Number  x<      {the tty}
  861.     /dev/null is open
  862.     filelock: ok
  863.     filelock: ok
  864.     dcf is 6
  865.     fixline(6, 38400)                   {note the speed}
  866.     ACU write ok(null)
  867.     fixline(6, 38400)
  868.     set interface 212
  869.     processdev: calling setdevcfg(, ACUSLIP)    {the Devices entry used}
  870.     gdial(zy1496) called                {the Dialers entry used}
  871.     expect: ("")                        {this is in the Dialers script}
  872.     got it
  873.     sendthem (DELAY
  874.     ^MPAUSE
  875.     <NO CR>ATs2=128s0=0^M)
  876.     expect: (OK^M)                      {it can talk to the modem!}
  877.     ^MATs2=128s0=0^M^M^JOK^Mgot it
  878.     sendthem (<NO CR>ATdtw3906041^M)    {dialing the phone number}
  879.     expect: (CONNECT)                   {answered!}
  880.     ^JATdtw3906041^M^M^JCONNECTgot it   {connected}
  881.     getto ret 6
  882.     expect: ("")                        {starting the chat script in Systems}
  883.     got it
  884.     sendthem (<NO CR>^M)
  885.     expect: (ogin:)
  886.      38400/V32b 14400/V42b^M^J^M^J^M^JTelebit's NetBlazer Version 2.1^M^J^M^Jslipserv login:got it
  887.     sendthem (Poniboshi^M)              {sending the login ID}
  888.     expect: (assword:)
  889.      Poniboshi^M^JPassword:got it
  890.     sendthem (??????????^M)             {I've protected my password}
  891.     expect: (enabled)
  892.      ^M^J^M^JPacket mode enabledgot it  {now PPP negotiation starts}
  893.     banner: ^M^J~^┐}#@!}!} } }8}!}$}%\}"}&} } } } }%}&}3^EJ}6}'}"}(}"F^E~
  894.     ppp slipserv: saving 53 bytes to salvage
  895.     ppp slipserv: starting with /dev/ttyf1 debug=2 active_timeout=0 inactive=0
  896.     ppp slipserv: IPCP Initial (0)->Starting (1)
  897.     ppp slipserv: LCP Initial (0)->Closed (2)
  898.     ppp slipserv: LCP Closed (2)->Req-Sent (6)
  899.     ppp slipserv: LCP Req-Sent (6)->Ack-Sent (8)
  900.     ppp slipserv: LCP Ack-Sent (8)->Opened (9)
  901.     ppp slipserv: MTU=1500 MRU=1500 accm=0 pcomp=y acomp=y my-magic=0x7fb6508b his=0x13854a16
  902.     ppp slipserv: entering Authenticate phase
  903.     ppp slipserv: entering Network phase
  904.     ppp slipserv: IPCP Starting (1)->Req-Sent (6)
  905.     ppp slipserv: IPCP Req-Sent (6)->Ack-Sent (8)
  906.     ppp slipserv: IPCP Ack-Sent (8)->Opened (9)
  907.     ppp slipserv: 192.48.197.10 to 192.26.51.135
  908.     ppp slipserv: rx_vj_comp=y,tx=y rx_compslot=n,tx=n rx_slots=16,tx=15
  909.  
  910.     {now PPP is up and running}
  911.  
  912. If you get a timeout at any point instead of going on to the next
  913. part, this should be a strong indication of which part of the
  914. configuration to go back and re-check.
  915.  
  916. APPENDIX
  917.  
  918. SAMPLE GATED.CONF FILES
  919.  
  920. Sample client /usr/etc/gated.conf:
  921.  
  922. # gated.conf
  923. #
  924. ## Disclaimer: I am not a gated expert!!!!!
  925. ## in fact I know just enough to be dangerous
  926. ## use at your own risk!
  927. #
  928. # The information in the file is identified by the keywords which commence
  929. # at the start of a new line. Any text to the right of a # is a comment.
  930. # To change initialization info after egpup is running, kill the process
  931. # (which will initiate the correct cease message exchange) and restart it.
  932.  
  933.  
  934. RIP supplier
  935. HELLO no
  936. EGP no
  937.  
  938. # Trace options
  939. # traceflags internal external route
  940.  
  941. # use the server IP address instead of the IP address below
  942.  
  943. net default gateway 192.102.100.1 metric 1 rip
  944. #
  945. # end
  946.  
  947. Sample server /usr/etc/gated.conf:
  948.  
  949. # gated.conf
  950. #
  951. ## Disclaimer: I am not a gated expert!!!!!
  952. ## in fact I know just enough to be dangerous
  953. ## use at your own risk!
  954. #
  955. # The information in the file is identified by the keywords which commence
  956. # at the start of a new line. Any text to the right of a # is a comment.
  957. # To change initialization info after egpup is running, kill the process
  958. # (which will initiate the correct cease message exchange) and restart it.
  959.  
  960.  
  961. RIP supplier
  962. HELLO no
  963. EGP no
  964.  
  965. # Trace options
  966. # traceflags internal external route
  967.  
  968. # use the network number and PPP-client IP address instead of the
  969. # numbers below
  970.  
  971. net 192.102.101 gateway 192.102.101.1 metric 1 rip
  972. #
  973. # end
  974.